home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 October / CHIP Turkiye Ekim 2000.iso / prog / share / 46 / _SETUP.1 / mywebhal.uhp < prev    next >
Text File  |  2000-06-26  |  2KB  |  29 lines

  1. 'Type=Internet
  2. 'Name=myWebHal Internet Plugin
  3. 'Updated=6/25/2000
  4. 'Language=VBScript
  5. 'This plugin gives Hal access to the Internet so Hal can assist
  6. 'in browsing the Internet and automatically getting information
  7. 'for you
  8.  
  9. Function GetResponse(ByVal UserSentence, ByVal UserName, ByVal Password, ByVal HCurDir, ByVal FacePrvw)
  10.      FacePrvw = HCurDir & "\" & FacePrvw
  11.      FacePrvw = Replace(FacePrvw, ":", "%3A")
  12.      FacePrvw = Replace(FacePrvw, "\", "%5C")
  13.      FacePrvw = Replace(FacePrvw, " ", "+")
  14.      If InStr(1, UserSentence, "Weather", 1) > 0 Then
  15.           GetResponse = "Here is your local weather.<RUN>http://www.zabaware.com/mywebhal/index.html?username=" & UserName & "&action=weather&char=" & FacePrvw & "</RUN>"
  16.      End If
  17.      If InStr(1, UserSentence, "news", 1) > 0 Then
  18.           GetResponse = "I am now opening your favorite news site.<RUN>http://www.zabaware.com/mywebhal/index.html?username=" & UserName & "&action=news&char=" & FacePrvw & "</RUN>"
  19.      End If
  20.      If InStr(1, UserSentence, "news", 1) > 0 And InStr(1, UserSentence, "local", 1) > 0 Then
  21.           GetResponse = "Here is your local news.<RUN>http://www.zabaware.com/mywebhal/index.html?username=" & UserName & "&action=localnews&char=" & FacePrvw & "</RUN>"
  22.      End If
  23.      If InStr(1, UserSentence, "search ", 1) > 0 Or InStr(1, UserSentence, "find ", 1) > 0 Or InStr(1, UserSentence, "locate ", 1) > 0 Then
  24.           Set HalBrain = CreateObject("UltraHalAsst.Brain")
  25.           Keywords = Replace(Trim(HalBrain.AlphaNumericalOnly(HalBrain.ExtractKeywords(UserSentence))), " ", "+")
  26.           GetResponse = "I will help you research this topic on the Internet.<RUN>http://www.zabaware.com/mywebhal/index.html?username=" & UserName & "&action=search&keywords=" & Keywords & "&char=" & FacePrvw & "</RUN>"
  27.      End If
  28. End Function
  29.